//
//  RCChangeOrderInfoDataModel.m
//  RocketProject
//
//  Created by Wu Chengwei on 13-11-25.
//  Copyright (c) 2013年 Rocket. All rights reserved.
//

#import "RCChangeOrderInfoDataModel.h"
#import "FrameworkRelativeDefines.h"

@implementation RCChangeOrderInfoDataModel
@synthesize mempoints = _mempoints;
@synthesize goodspinots = _goodspinots;
@synthesize shopName = _shopName;
@synthesize thumb = _thumb;
@synthesize userName = _userName;
@synthesize phone = _phone;
@synthesize sex = _sex;

-(id)init{
    self = [super init];
    if (self) {
        _mempoints = nil;
        _goodspinots = nil;
        _shopName = nil;
        _thumb = nil;
        _userName = nil;
        _phone = nil;
        _sex = nil;
    }
    return self;
}

-(void)dealloc{
    self.mempoints = nil;
    self.goodspinots = nil;
    self.shopName = nil;
    self.thumb = nil;
    self.userName = nil;
    self.phone = nil;
    self.sex = nil;
    [super dealloc];
}

+(id)parseDataFromJSON:(NSDictionary *)data{
    if (nil == data) {
        return nil;
    }
    NSDictionary *dict = [data dictionaryValueForKey:@"data" defaultValue:nil];
    if (nil == dict) {
        return nil;
    }
    
    RCChangeOrderInfoDataModel *retObject = nil;
    retObject = [[RCChangeOrderInfoDataModel alloc]init];
    if (nil == retObject) {
        return nil;
    }
    
    retObject.mempoints = [dict stringValueForKey:@"mempoints" defaultValue:nil operation:NSStringOperationTypeTrim];
    retObject.goodspinots = [dict stringValueForKey:@"goodspinots" defaultValue:nil operation:NSStringOperationTypeTrim];
    retObject.shopName = [dict stringValueForKey:@"shopname" defaultValue:nil operation:NSStringOperationTypeTrim];
    retObject.thumb = [dict stringValueForKey:@"thumb" defaultValue:nil operation:NSStringOperationTypeTrim];

    retObject.userName = [dict stringValueForKey:@"username" defaultValue:nil operation:NSStringOperationTypeTrim];
    retObject.phone = [dict stringValueForKey:@"phone" defaultValue:nil operation:NSStringOperationTypeTrim];
    retObject.sex = [dict stringValueForKey:@"sex" defaultValue:nil operation:NSStringOperationTypeTrim];
    
    return [retObject autorelease];
}


@end
